package com.artezio.vacation.dao;

import com.artezio.vacation.domain.User;
import com.artezio.vacation.domain.Vacation;

/**
 * Common interface for all entity dao objects.
 * Each dao should provide common operations like update, select, delete.
 */
public interface EntityDAO<T> {

    /**
     * Find the entity object with id
     *
     * @param id
     * @return entity object
     */
    public T find(long id);

    /**
     * Save or update the entity object
     *
     * @param obj
     */
    public void saveOrUpdate(T obj);

    /**
     * Delete the entity object
     *
     * @param obj
     */
    public void delete(T obj);
}
